/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#ifndef _ISCRIPT_H_
#define _ISCRIPT_H_

class IScript
{
public:
	struct ScriptArgument
	{
		enum ArgumentType
		{
			INTEGER,
			FLOAT,
			BOOLEAN,
			STRING,
			ENDOFLIST
		};
		
		ArgumentType   type;
		int            intValue;
		float          floatValue;
		bool           booleanValue;
		const char   * stringValue;
	};
public:
	virtual ~IScript()
	{
	}
	virtual bool createFromFile(const char * path) = 0;
	virtual bool createFromString(const char * code) = 0;
	virtual bool run() = 0;
	virtual bool run(const char * functionName, ScriptArgument * arguments) = 0;
	virtual bool registerFunction(const char * functionName, void * function) = 0;
	virtual void release()
	{
		delete this;
	}
};

#endif